package ioc05;

import lombok.Data;

/**
 * Author：汤小洋
 * Date：2023-12-13 15:25
 * Description：<描述>
 */
@Data
public class SpringBean {
    private String name;

    public SpringBean() {
        System.out.println("SpringBean的无参构造方法");
    }

    public void setName(String name) {
        System.out.println("SpringBean的setName方法");
        this.name = name;
    }

    /**
     * 初始化方法
     */
    public void init(){
        System.out.println("SpringBean的init方法.......");
        this.name = this.name.toUpperCase();
    }

    /**
     * 销毁方法
     */
    public void destroy(){
        System.out.println("SpringBean的destroy方法.......");
    }
}
